// pages/99life/allpro.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
	 inputshow:false,
	  tabindex:0,
	  products:[
		  {
			   typename:"精选",content:[
				   { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price:"2999",integral: "500"},
				   { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
				   { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
				   { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
				   { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
			   ]
		  },
		  {
			  typename: "餐饮", content: [
				  { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
				  { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" }
			  ]
		  },
		  {
			  typename: "玩乐", content: [
				  { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
				  { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
			  ]
		  },
		  {
			  typename: "商超", content: [
				  { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
				  { img: "/images/product2.png", name: "小米LD5889行车记录仪单镜头高画质精品", price: "2999", integral: "500" },
			  ]
		  },
	  ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
	  var that = this;
	  wx.getSystemInfo({
		  success: function (res) {
			  that.setData({
				  height: res.windowHeight
			  });
		  }
	  });

  },

  lefttab:function(e){
	  this.setData({
		  tabindex:e.currentTarget.dataset.index
	  })
  },
  showinput:function(){
	  this.setData({
		  inputshow:true
	  })
  }
})